Repository navigation
Zero to a non-real power is defined where its real part is positive - #1866
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1865.
Simplifyturned0 * b^iandb^i - b^iinto NaN. As a result,Differentiatereturned NaN forx * b^i, and for every antiderivative with a constant like(e^a)^iin it, such assec(a + i*ln(x))^3's. Those answers were right, but they could not be differentiated back.A power's domain condition was
not b = 0 or w > 0. For a non-real numberw,w > 0has no value, because the complex numbers are not ordered.0^wis defined whereRe(w) > 0, which is what0^w's own simplification already decides. For a numeric exponent, the condition now reads the real part. A symbolic exponent keepsw > 0.Measured on master 8bdfcfe and on 2.5.0, which agree:
"0 * b^i".Simplify()NaN0 provided not b = 0"b^i - b^i".Simplify()NaN0 provided not b = 0"0 * b^(2 + i)".Simplify()NaN0"x * b^i".Differentiate("x")NaNb ^ i provided not b = 0"0 ^ i".Simplify()NaNNaN, unchanged: it does not existRubi corpus, compared with master 8bdfcfe:
x^k tan(a + i ln x)andx^k cot(a + i ln x). On master their answers were verified only after an extraSimplify; on this branch they verify directly. Each was re-run on its own.The allocation gate passed. The suite passed: 15,302 passed, 0 failed, run alone after memguard stopped the chained run at 8.2 GB.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura